/*
********************************************************************************
* Copyright (C) 2021, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : log_base.h
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2021-12-17 version v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
                Compile command: make
********************************************************************************
*/
#ifndef __SYS_LOG_H__
#define __SYS_LOG_H__

#define LOG_INFO    3
#define LOG_DEBUG   2
#define LOG_WARN    1
#define LOG_ERR     0

// 封装Log对外使用接口
#define LOGI(tag, msg)  sys_log(LOG_INFO,   tag, msg)
#define LOGD(tag, msg)  sys_log(LOG_DEBUG,  tag, msg)
#define LOGW(tag, msg)  sys_log(LOG_WARN,   tag, msg)
#define LOGE(tag, msg)  sys_log(LOG_ERR,    tag, msg)

// log使用接口
int sys_log(int level, const char *tag, const char *msg);

#endif